<template>
  <div class="basic_info">
    <div class="info_operation_btn">
      <div class="btn_left">
        <el-button type="primary" @click="toDanJu">查看单据</el-button>
        <!-- <el-button @click="exportExcel" :disabled="!buttonsPermissions.DaoChu"
              :class="!buttonsPermissions.DaoChu ? 'disabled_button' : ''">导出</el-button> -->
        <el-button
          :disabled="!buttonsPermissions.DaYin"
          :class="!buttonsPermissions.DaYin ? 'disabled_button' : ''"
          @click="handleShortcutKeyPrint"
          >打印(P)</el-button
        >
        <el-checkbox v-model="queryData.hideRedRushFlag" style="margin-left: 10px" @change="onQuery"
          >显示红冲单据</el-checkbox
        >
      </div>
      <div class="btn_right">
        <!-- <el-input v-model="queryData.orderNumberParam" :placeholder="placeholder" />
        <el-button type="primary" @click="onQuery">搜索</el-button> -->
        <el-button @click="onRefresh">刷新</el-button>
        <i @click="onShowColumn()" class="set_up el-icon-s-tools"></i>
      </div>
    </div>
    <div class="info_content_div">
      <div class="div_table">
        <div class="div_screen">
          <div class="screen_left">
            <div class="custom_item">
              <div class="item_title">{{ topText }}：</div>
              <div class="item_title">{{ topName }}</div>
            </div>
          </div>
          <!-- <div class="screen_right">
            <el-select @change="changeDate" v-model="monthValue">
              <el-option v-for="item in monthOptions" :key="item" :label="item" :value="item"></el-option>
            </el-select>
            <el-date-picker
              v-model="nowDate"
              type="daterange"
              range-separator="~"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              @change="onClickPicker"
              value-format="yyyy-MM-dd"
            ></el-date-picker>
            <el-button type="primary" @click="onQuery">查询</el-button>
          </div> -->
        </div>
        <div class="table_content">
          <el-table
            ref="tableRefByGys"
            show-summary
            :summary-method="getSummaries"
            highlight-current-row
            :data="tableData.records"
            height="100%"
            @sort-change="changeSort"
            @row-click="onRowClick"
            @row-dblclick="onRowDblClick"
          >
            <el-table-column :resizable="false" label="序号" type="index" width="50"></el-table-column>
            <template v-for="(item, index) in khColumnData">
              <el-table-column
                :show-overflow-tooltip="true"
                :key="index"
                :label="item.zidingyiName ? item.zidingyiName : item.morenName"
                :prop="item.props"
                min-width="120px"
                v-if="item.zidingyiState"
                :sortable="item.sortable"
                :width="
                  item.props == 'orderNumber' || item.props == 'checkDate' || item.props == 'orderDate' ? '170px' : ''
                "
              ></el-table-column>
            </template>
          </el-table>
        </div>
        <div class="table_pagination">
          <div class="pagination_div">
            <el-pagination
              background
              @size-change="handleSizeChange"
              @current-change="handleCurrentChange"
              :current-page="currentPage"
              :page-sizes="[20, 50, 100, 200]"
              :page-size="pagesize"
              layout="jumper, prev, pager,next, sizes"
              :total="tableData.total"
            ></el-pagination>
          </div>
        </div>
      </div>
    </div>
    <!-- 列配置弹框 -->
    <CConfiguration
      ref="setColumnRef"
      :columnDataArr="columnData"
      :defaultColumnDataArr="defaultColumnData"
      :orderType="orderType"
      @onSaveColumn="onSaveColumn"
    ></CConfiguration>
    <!-- 打印 -->
    <dialog-print ref="print"></dialog-print>
  </div>
</template>
    
    <script>
import CConfiguration from '@/components/c_column/columnConfiguration1'
/**打印 */
import dialogPrint from '@/views/components/dialogPrintStatic'
import { getAction, postAction, downPostFile } from '@/api/manage'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'

// 导入调用处理权限数据方法
import { handlePermissions, handleOtherPerms } from '@/utils/index'
import { delcommafy, formatMoney, formatNumber, formatPrice, getLikeCompanyId } from '../../../utils'
import { toBillDetail } from '@/utils/billUtil'
export default {
  name: 'orderStatistics',
  components: {
    CConfiguration,
    dialogPrint,
  },
  mixins: [JeecgListMixin],
  computed: {
    buttonsPermissions() {
      return handlePermissions('其他出库单统计')
    },
    printPermissions() {
      return handleOtherPerms('单据可多次打印')
    },
  },
  created() {
    let params = this.$route.query
    console.log('params', params)
    this.queryData.beginDate = params.beginTime
    this.queryData.endDate = params.endTime
    this.queryData.companyId = params.companyId
    this.queryData.goodsId = params.goodsId
    this.queryData.goodsType = params.goodsType
    this.queryData.storehouseId = params.storehouseId
    this.queryData.deptId = params.deptId
    this.queryData.userId = params.userId
    this.queryData.outStoreType = params.xghOutType
    if (params.tjfsValue == 1 && !params.xghCompanyTypeId) {
      this.topText = '供应商名称'
      this.topName = params.companyName
    } else if (params.tjfsValue == 2 && !params.xghGoodsTypeId) {
      this.topText = '商品名称'
      this.topName = params.goodsName
    } else if (params.tjfsValue == 3) {
      this.topText = '仓库'
      this.topName = params.storehouseName
    } else if (params.tjfsValue == 4) {
      this.topText = '部门'
      this.topName = params.deptName
    } else if (params.tjfsValue == 5) {
      this.topText = '经手人'
      this.topName = params.userName
    } else if (params.tjfsValue == 1 && params.xghCompanyTypeId) {
      this.queryData.companyType = params.xghCompanyTypeId
      this.topText = '客户类别'
      this.topName = params.companyName
    } else if (params.tjfsValue == 2 && params.xghGoodsTypeId) {
      this.queryData.goodsType = params.xghGoodsTypeId
      this.topText = '商品类别'
      this.topName = params.goodsName
    }
    // this.buttonsPermissions = handlePermissions('采购订单统计')
    this.getData()
  },
  updated() {
    this.$nextTick(() => {
      this.$refs['tableRefByGys'].doLayout()
    })
  },
  data() {
    return {
      // 存储按钮权限数据
      // buttonsPermissions: {},
      orderType: '其他出库单统计明细', //控制列配置的单据类型
      queryData: {
        orderNumberParam: '', // 单据编号/往来单位
        companyIdParam: '',
        beginDate: '', // 开始时间
        endDate: '', // 结束时间
        companyId: '', // 供应商id
        goodsId: '', // 商品id
        goodsName: '', // 商品名称
        goodsType: '', // 商品类型id
        storehouseId: '', // 仓库id
        deptId: '', // 部门id
        userId: '', // 经手人id
        companyType: '', // 往来单位类别id
        outStoreType: '', // 出库类型
        hideRedRushFlag: false, // 是否隐藏红冲单据
      },
      placeholder: '请输入商品名称\\条码\\编码\\规格\\拼音码',
      // 月份选择
      monthValue: '本月',
      monthOptions: ['今日', '本周', '本月', '本年'],
      nowDate: [],
      // 表格数据
      tableData: {},
      // 列名
      khColumnData: [
        {
          morenName: '审核日期',
          zidingyiName: '',
          morenState: true,
          zidingyiState: true,
          noModify: false,
          props: 'checkDate',
          sortable: false,
        },
        {
          morenName: '单据状态',
          zidingyiName: '',
          morenState: true,
          zidingyiState: true,
          noModify: false,
          props: 'buyOrderStatusStr',
          sortable: false,
        },
        {
          morenName: '单据日期',
          zidingyiName: '',
          morenState: true,
          zidingyiState: true,
          noModify: false,
          props: 'orderDate',
          sortable: false,
        },
        {
          morenName: '单据编号',
          zidingyiName: '',
          morenState: true,
          zidingyiState: true,
          noModify: false,
          props: 'orderNumber',
          sortable: false,
        },
        {
          morenName: '仓库',
          zidingyiName: '',
          morenState: true,
          zidingyiState: true,
          noModify: false,
          props: 'storehouseName',
          sortable: false,
        },
        {
          morenName: '商品编码',
          zidingyiName: '',
          morenState: true,
          zidingyiState: true,
          noModify: false,
          props: 'goodsNumber',
          sortable: false,
        },
        {
          morenName: '商品名称',
          zidingyiName: '',
          morenState: true,
          zidingyiState: true,
          noModify: false,
          props: 'goodsName',
          sortable: false,
        },
        {
          morenName: '规格',
          zidingyiName: '',
          morenState: true,
          zidingyiState: true,
          noModify: false,
          props: 'specs',
          sortable: false,
        },
        {
          morenName: '单位',
          zidingyiName: '',
          morenState: true,
          zidingyiState: true,
          noModify: false,
          props: 'baseUnit_dictText',
          sortable: false,
        },
        {
          morenName: '出库数量',
          zidingyiName: '',
          morenState: true,
          zidingyiState: true,
          noModify: false,
          props: 'outNumber',
          sortable: true,
        },
        {
          morenName: '单价',
          zidingyiName: '',
          morenState: true,
          zidingyiState: true,
          noModify: false,
          props: 'price',
          sortable: true,
        },
        {
          morenName: '出库金额',
          zidingyiName: '',
          morenState: true,
          zidingyiState: true,
          noModify: false,
          props: 'total',
          sortable: true,
        },
        {
          morenName: '经手人',
          zidingyiName: '',
          morenState: true,
          zidingyiState: true,
          noModify: false,
          props: 'userName',
          sortable: false,
        },
        {
          morenName: '备注',
          zidingyiName: '',
          morenState: true,
          zidingyiState: true,
          noModify: false,
          props: 'remark',
          sortable: false,
        },
      ],
      columnData: [], //传递给列配置组件的列名
      defaultColumnData: [],
      pagesize: 20, //每页的数据条数
      currentPage: 1, //默认开始页面
      updateId: '', // 修改列配置时返回的id
      url: {
        listUrl: '/xghSaleStorehouseOrder/xghSaleStorehouseOrder/otherOutStoreOrderDetail',
        exportXlsUrl: '/xghPurchaseOrder/xghPurchaseOrder/exportPurchaseCountXls',
      },
      api: '',
      billName: '其他出库单统计明细',
      topText: '',
      topName: '',
      rowData: {}, // 行数据
    }
  },
  mounted() {},
  methods: {
    // 打印
    async handleShortcutKeyPrint() {
      // 查询
      let data = {
        ...this.queryData,
        pageSize: 1000000,
        pageNo: 1,
      }
      let printExclusive = []
      const res = await getAction(this.url.listUrl, data)
      if (res.code !== 200) {
        return this.$elMessage.error('获取数据失败！')
      }
      printExclusive = res.result.records || []
      printExclusive.forEach((item, index) => {
        item['xh'] = index + 1
      })
      const pricearr = ['price']
      const monarr = ['total']
      const numarr = ['outNumber']
      printExclusive = (res.result.records || []).map((item) => {
        // 遍历 item 对象的键
        Object.keys(item).map((key) => {
          if (numarr.includes(key)) {
            item[key] = formatNumber(item[key])
          } else if (monarr.includes(key)) {
            item[key] = formatMoney(item[key])
          } else if (pricearr.includes(key)) {
            item[key] = formatPrice(item[key])
          }
        })
        return item
      })
      this.onQuery()
      // 打印
      if (!this.buttonsPermissions.DaYin) {
        this.$elMessage.warning('未拥有打印权限！')
      } else if (!printExclusive || printExclusive.length <= 0) {
        this.$elMessage.warning('没有要打印的记录！')
      } else {
        let printData = {
          riqi: this.queryData.beginDate + '~' + this.queryData.endDate,
          printExclusive,
        }
        // 可以多次打印设置
        if (this.printPermissions) {
          this.$refs.print.show(printData, this.columnData, this.orderType)
        } else {
          if (this.$lcStorage.get('printLimitValue')) {
            // 获取打印次数
            this.getPrintNum(this.orderType, () => {
              this.$refs.print.show(printData, this.columnData, this.orderType)
            })
          } else {
            this.$refs.print.show(printData, this.columnData, this.orderType)
          }
        }
      }
    },
    // 初始化获取数据
    getData() {
      // this.getTimeRange(this.$setTimeRange(5)) // 默认获取当月时间
      this.getTableData() // 获取表格信息数据
      this.columnData = JSON.parse(JSON.stringify(this.khColumnData))
      this.selectTitle()
    },
    // 初始化查询列配置值
    async selectTitle() {
      this.api = this.orderType
      let obj = await this.$setColumn.selectColumn(this.api)
      if (obj.code === 200) {
        this.updateId = obj.updateId
        this.khColumnData = JSON.parse(JSON.stringify(obj.columnData))
      } else if (obj.code === 500) {
        let id = await this.$setColumn.addColumn(this.api, this.columnData, 0, this.updateId)
        this.updateId = id
      }
    },
    // 修改列配置后保存修改后的值
    async onSaveColumn(value) {
      this.khColumnData = JSON.parse(JSON.stringify(value))
      this.columnData = JSON.parse(JSON.stringify(value))
      let res = await this.$setColumn.editColumn(this.api, this.columnData, this.updateId)
      if (res.code == 200) {
        this.$elMessage.success(res.message)
      } else {
        this.$elMessage.error(res.message)
      }
    },
    async getTableData() {
      let data = {
        ...this.queryData,
        companyIdParam: getLikeCompanyId(this.gysOptions, this.queryData.orderNumberParam),
        pageSize: this.pagesize,
        pageNo: this.currentPage,
      }
      const res = await getAction(this.url.listUrl, data)
      if (res.code !== 200) {
        return this.$elMessage.error('获取数据失败！')
      }
      this.tableData = res.result
      this.tableData.records.forEach((item, index) => {
        item['xh'] = index + 1
        item.outNumber = formatNumber(item.outNumber)
        item.price = formatMoney(item.price)
        item.total = formatMoney(item.total)
      })
    },
    // 导出
    exportExcel() {
      let companyIdParam = ''
      if (this.queryData.orderNumberParam) {
        let companyIdParamList = []
        for (let index = 0; index < this.gysOptions.length; index++) {
          const element = this.gysOptions[index]
          if (element.companyName.indexOf(this.queryData.orderNumberParam) > -1) {
            companyIdParamList.push(element.id)
          }
        }
        if (companyIdParamList.length) {
          companyIdParam = companyIdParamList.toString()
        }
      }
      let data = {
        ...this.queryData,
        companyIdParam,
        fileName: '其他出库单统计明细',
      }
      this.handleExportXlsByStaff('其他出库单统计明细', data)
    },
    // 搜索/查询
    onQuery() {
      this.getTableData()
    },
    // 刷新
    onRefresh() {
      Object.assign(this.$data, this.$options.data())
      let params = this.$route.query
      console.log('params', params)
      this.queryData.beginDate = params.beginTime
      this.queryData.endDate = params.endTime
      this.queryData.companyId = params.companyId
      this.queryData.goodsId = params.goodsId
      this.queryData.goodsType = params.goodsType
      this.queryData.storehouseId = params.storehouseId
      this.queryData.deptId = params.deptId
      this.queryData.userId = params.userId
      this.queryData.outStoreType = params.xghOutType
      if (params.tjfsValue == 1 && !params.xghCompanyTypeId) {
        this.topText = '供应商名称'
        this.topName = params.companyName
      } else if (params.tjfsValue == 2 && !params.xghGoodsTypeId) {
        this.topText = '商品名称'
        this.topName = params.goodsName
      } else if (params.tjfsValue == 3) {
        this.topText = '仓库'
        this.topName = params.storehouseName
      } else if (params.tjfsValue == 4) {
        this.topText = '部门'
        this.topName = params.deptName
      } else if (params.tjfsValue == 5) {
        this.topText = '经手人'
        this.topName = params.userName
      } else if (params.tjfsValue == 1 && params.xghCompanyTypeId) {
        this.queryData.companyType = params.xghCompanyTypeId
        this.topText = '客户类别'
        this.topName = params.companyName
      } else if (params.tjfsValue == 2 && params.xghGoodsTypeId) {
        this.queryData.goodsType = params.xghGoodsTypeId
        this.topText = '商品类别'
        this.topName = params.goodsName
      }
      // this.buttonsPermissions = handlePermissions('采购订单统计')
      this.getData()
    },
    // 判断当前选择时间段
    changeDate(val) {
      switch (val) {
        case '全部':
          break
        case '今日':
          this.getTimeRange(this.$setTimeRange(1))
          break
        case '昨天':
          this.getTimeRange(this.$setTimeRange(2))
          break
        case '本周':
          this.getTimeRange(this.$setTimeRange(3))
          break
        case '上周':
          this.getTimeRange(this.$setTimeRange(4))
          break
        case '本月':
          this.getTimeRange(this.$setTimeRange(5))
          break
        case '上月':
          this.getTimeRange(this.$setTimeRange(6))
          break
        case '本年':
          this.getTimeRange(this.$setTimeRange(7))
          break
        case '去年':
          this.getTimeRange(this.$setTimeRange(8))
          break
        default:
          break
      }
      this.getTableData()
    },
    // 获取时间范围并设置
    getTimeRange(data) {
      this.nowDate = [data.now, data.end]
      this.queryData.beginDate = data.now
      this.queryData.endDate = data.end
    },
    // 获取当前选中时间
    onClickPicker(val) {
      this.queryData.beginDate = val[0]
      this.queryData.endDate = val[1]
      this.getTableData()
    },
    // 触发列配置弹框
    onShowColumn() {
      console.log('this.khColumnData', this.khColumnData)
      // if (this.queryData.type == 1) {
      //   // this.defaultColumnData = JSON.parse(JSON.stringify(this.$options.data().spColumnData))
      //   let list = []
      //   for (let index = 0; index < this.spColumnData.length; index++) {
      //     const element = this.spColumnData[index]
      //     let sub = element.subset
      //     list = list.concat(sub)
      //   }
      //   let defaultList = []
      //   for (let index = 0; index < this.defaultColumnData.length; index++) {
      //     const element = this.defaultColumnData[index]
      //     let sub = element.subset
      //     defaultList = defaultList.concat(sub)
      //   }
      //   this.$refs.setColumnRef.loadData(list, defaultList)
      // } else if (this.queryData.type == 2) {
      //   this.defaultColumnData = JSON.parse(JSON.stringify(this.$options.data().khColumnData))
      //   this.$refs.setColumnRef.dialogVisible = true
      // } else if (this.queryData.type == 3) {
      //   this.defaultColumnData = JSON.parse(JSON.stringify(this.$options.data().ywyColumnData))
      //   this.$refs.setColumnRef.dialogVisible = true
      // }
      this.defaultColumnData = JSON.parse(JSON.stringify(this.$options.data().khColumnData))
      console.log('this.defaultColumnData', this.defaultColumnData)
      this.$refs.setColumnRef.dialogVisible = true
    },
    // 合计列计算
    getSummaries(param) {
      const { columns, data } = param
      const sums = []
      let arr = ['outNumber', 'price', 'total']
      const numarr = ['outNumber']
      columns.forEach((column, index) => {
        if (index === 0) {
          sums[index] = '合计'
        } else if (index === 1) {
          sums[index] = '共' + this.tableData.total + '条明细'
        } else if (arr.indexOf(column.property) > -1) {
          const values = data.map((item) => delcommafy(item[column.property]))
          if (!values.every((value) => isNaN(value))) {
            sums[index] = values.reduce((prev, curr) => {
              const value = delcommafy(curr)
              if (!isNaN(value)) {
                return prev + curr
              } else {
                return prev
              }
            }, 0)
            if (numarr.includes(column.property)) {
              sums[index] = this.$formatNumber(sums[index])
            } else {
              sums[index] = this.$formatMoney(sums[index])
            }
          } else {
            sums[index] = ''
          }
        }
      })
      return sums
    },
    // 获取每页几条数据
    handleSizeChange(val) {
      this.pagesize = val
      this.getTableData()
    },
    // 获取当前第几页
    handleCurrentChange(val) {
      this.currentPage = val
      this.getTableData()
    },
    // 历史记录数据去重并只展示三个数据方法
    selectDataHas(arr) {
      let map = new Map()
      for (const item of arr) {
        if (!map.has(item.id)) {
          map.set(item.id, item)
        }
      }
      let newArr = [...map.values()]
      return newArr.slice(0, 3)
    },
    // 数据排序，传入列名和排序方式
    changeSort(val) {
      this.queryData.sortName = val.prop // 排序参数
      this.queryData.isSort = val.order // ascending == 1正序  descending == 2 倒序
      this.getTableData()
    },
    // 搜索
    handleFilterMethod(value, label) {
      if (label == 'companyName') {
        this.gysOptions = this.filterMethod(this.gysOptions, value, label)
      } else if (label == 'storehouseName') {
        this.ckOptions = this.filterMethod(this.ckOptions, value, label)
      } else if (label == 'realname') {
        this.jsrOptions = this.filterMethod(this.jsrOptions, value, label)
      } else if (label == 'goodsName') {
        this.spmcOptions = this.filterMethod(this.spmcOptions, value, label)
      }
    },
    // 行点击
    onRowClick(row) {
      console.log('row', row)
      this.rowData = row
    },
    // 行双击
    onRowDblClick(row) {
      console.log('row', row)
      this.rowData = row
      this.toDanJu()
    },
    // 跳转对应单据页面
    toDanJu() {
      if (!this.rowData || Object.keys(this.rowData).length === 0) {
        this.$elMessage.warning('请先选择一条单据！')
        return
      }
      toBillDetail(this, 26, this.rowData.id)
    },
  },
}
</script>
    
    <style lang="scss" scoped>
.basic_info {
  width: 100%;
  height: calc(100vh - 102px);
  background: #f0f2f5;
  box-sizing: border-box;
  padding: 0 0.168761rem 0.168761rem;
  display: flex;
  flex-direction: column;
}

.info_operation_btn {
  width: 100%;
  height: 60px;
  display: flex;
  align-items: center;

  .el-button {
    width: 70px;
    height: 30px;
    text-align: center;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border-radius: 5px;
    border: none;
    margin-right: 6px;
  }

  .el-button--default {
    color: #666;
  }

  .btn_left {
    width: 60%;
    display: flex;
    justify-content: flex-start;
    align-items: center;

    p {
      font-size: 12px;
      color: #666;
      margin: 0 0.1rem 0 0.187512rem;
    }

    ::v-deep .el-checkbox__label {
      font-size: 12px;
      padding-left: 0.1rem;
    }

    ::v-deep .el-select {
      width: 70px;
      height: 40px;
      box-sizing: border-box;
      margin-right: 0.187512rem;

      .el-input {
        .el-input__inner {
          height: 40px;
          border: none;
          font-size: 12px;
        }

        .el-input__suffix {
          height: 40px;
          display: flex;
          align-items: center;
        }
      }
    }

    .selectSty {
      width: 2.625164rem;
    }
  }

  .btn_right {
    width: 40%;
    display: flex;
    justify-content: flex-end;
    align-items: center;

    .el-input {
      width: 250px;
      height: 30px;
      margin-right: 0.112507rem;

      ::v-deep .el-input__inner {
        height: 30px;
        border: none;
        box-sizing: border-box;
        padding: 0 0.15rem;
        background: #fff;
        font-size: 12px;
        color: #666;

        &::placeholder {
          font-size: 12px;
          color: #c1c1c1;
        }
      }
    }

    .set_up {
      font-size: 23px;
      color: rgb(153, 153, 153);
    }
  }
}

.info_content_div {
  width: 100%;
  height: calc(100% - 60px);
  background: #fff;
  box-sizing: border-box;
  padding: 10px;
  display: flex;

  .div_table {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s;

    .div_screen {
      width: 100%;
      height: 50px;
      margin-bottom: 10px;
      display: flex;
      justify-content: space-between;

      .screen_left {
        font-size: 12px;
        box-sizing: border-box;
        display: flex;
        justify-content: flex-start;
        flex-wrap: wrap;
        min-width: 600px;
      }

      .screen_right {
        margin-right: 20px;
        box-sizing: border-box;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        box-sizing: border-box;

        ::v-deep .el-button {
          // width: 60px;
          height: 30px;
          display: flex;
          align-items: center;
          justify-content: center;
          font-size: 12px;
          border-radius: 5px;
          border: none;
        }

        ::v-deep .el-select {
          width: 80px;
          margin: 0 10px;

          .el-input {
            .el-input__inner {
              height: 30px;
              border-color: #e3e3e3;
              font-size: 12px;
              padding-left: 5px;
            }

            .el-input__suffix {
              height: 30px;
              display: flex;
              align-items: center;
            }
          }
        }

        ::v-deep .el-date-editor {
          width: 220px;
          height: 30px;
          background: #ffffff;
          border: 1px solid #d9d9d9;
          margin-right: 0.112507rem;
          padding: 3px 6px;

          .el-range__icon {
            position: absolute;
            right: 0;
            line-height: 30px;
          }

          .el-range-separator {
            line-height: 24px;
          }

          .el-range-input {
            font-size: 12px;
          }

          .el-range__close-icon {
            display: none;
          }
        }
      }
    }

    .table_content {
      height: calc(100% - 150px);

      ::v-deep .el-table {
        border: 1px solid #e3e3e3;
        border-bottom: none;
        box-sizing: border-box;
        height: 100%;

        th,
        td {
          padding: 0;
          color: #666;
          box-sizing: border-box;
          border-right: 1px solid #e3e3e3;

          .cell {
            line-height: 30px;
            display: flex;
            align-items: center;
            font-size: 12px;
          }

          &:first-child {
            .cell {
              justify-content: center;
              padding: 0;
            }
          }

          &:nth-child(2) {
            .cell {
              justify-content: center;
            }
          }

          &:last-child {
            .cell {
              justify-content: center;
            }
          }
        }

        th {
          .cell {
            // background: #ededed;
            justify-content: center;
          }
        }

        .el-checkbox {
          .is-indeterminate {
            .el-checkbox__inner {
              color: #1b93f9;
              background-color: #1b93f9;
              border-color: #1b93f9;
            }
          }
        }

        .el-icon-edit-outline {
          font-size: 0.25rem;
          color: #1b93f9;
          margin-right: 0.037502rem;
        }

        .el-icon-delete {
          font-size: 0.25rem;
          color: #ff2626;
          margin-left: 0.037502rem;
        }

        .el-table__body tr:hover > td {
          background: #e3f6ff;
        }

        .el-table__footer-wrapper {
          td {
            background: #f4f4f4;
            border: none;
          }
        }

        .el-table__header {
          tr {
            &:last-child {
              th {
                background: rgb(237, 237, 237) !important;
              }
            }
          }
        }

        //滚动条的宽度
        ::-webkit-scrollbar {
          width: 8px;
          height: 10px;
          background-color: #e5e5e5;
        }

        //滚动条的滑块
        ::-webkit-scrollbar-thumb {
          background-color: #c9c9c9;
        }
      }
    }

    .table_pagination {
      .total {
        margin-top: 0.25rem;
        width: 3.750234rem;
        font-size: 12px;
        color: #666666;
      }

      width: 100%;
      height: 50px;
      box-sizing: border-box;
      padding: 10px 0;
      display: flex;

      .pagination_div {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: flex-end;

        ::v-deep .el-pagination {
          padding: 0;
          height: 30px;

          .el-pagination__sizes {
            margin: 0;

            .el-input {
              margin-right: 0;
            }
          }
        }
      }
    }
  }
}

.custom_item {
  display: flex;
  font-size: 12px;
  align-items: center;
  margin: 10px 10px 10px 0;
  width: 180px;
}

.item_title {
  padding: 0 5px;
  width: auto;
  min-width: 60px;
  line-height: 30px;
  color: #666666;
  text-justify: distribute-all-lines;
  /*ie6-8*/
  text-align-last: justify;
  /* ie9*/
  -moz-text-align-last: justify;
  /*ff*/
  -webkit-text-align-last: justify;
  /*chrome 20+*/
}

.custom_select_head {
  flex: 1;
  height: 30px;
  position: relative;

  ::v-deep .el-select {
    .el-input {
      .el-input__inner {
        height: 30px;
        border-color: #e3e3e3;
        font-size: 12px;
        padding-left: 5px;
      }

      .el-input__suffix {
        height: 30px;
        display: flex;
        align-items: center;
      }
    }
  }

  ::v-deep .el-input {
    width: 100%;

    .el-input__inner {
      height: 30px;
      border-color: #e3e3e3;
      font-size: 12px;
      padding-left: 5px;
    }

    .el-input__suffix {
      height: 30px;
      display: flex;
      align-items: center;
    }
  }
}

.custom_more {
  position: absolute;
  right: 10px;
  z-index: 10;
  top: 1px;
  background: #fff;
  height: 28px;
  display: flex;
  align-items: center;
  color: #bfbfbf;
}

.custom_add {
  display: flex;
  justify-content: center;
  align-items: center;

  span {
    margin-left: 5px;
    color: #666666;
  }

  i {
    color: #666666;
  }
}

.disabled_button {
  background: #cbced3 !important;
  color: #666 !important;
}
</style>